package com.itheima.HomeWork;

import java.util.Random;

public class Demo3Arr {
    public static void main(String[] args) {

    Random r = new Random();
    int[] arr =new int[6];
    int num = 0;
    for(int i = 0; i < arr.length;i++){
         arr[i] = r.nextInt(100);
        num += arr[i];
    }
    System.out.println("随机生成的六个数和为"+num);
    }

}


